home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / misc / xrefwarn.sty < prev    next >
Text File  |  1993-01-11  |  2KB  |  51 lines

  1. %%% ====================================================================
  2. %%%  @LaTeX-style-file{
  3. %%%     author          = "Nico Verwer",
  4. %%%     version         = "1.2",
  5. %%%     date            = "24 February 1992",
  6. %%%     filename        = "xrefwarn.sty",
  7. %%%     address         = "Dept. of Computer Science
  8. %%%                        Rijksuniversiteit te Utrecht
  9. %%%                        P.O. box 80.089
  10. %%%                        3508 TB Utrecht
  11. %%%                        the Netherlands",
  12. %%%     telephone       = "+31 30 533921",
  13. %%%     FAX             = "+31 30 513791",
  14. %%%     email           = "nico@cs.ruu.nl (Internet)",
  15. %%%     codetable       = "ISO/ASCII",
  16. %%%     keywords        = "LaTeX, x-ref warnings",
  17. %%%     supported       = "yes",
  18. %%%     docstring       = "Normally, LaTeX issues a warning every
  19. %%%                        time it encounters an undefined cross-
  20. %%%                        reference or citation. Thus you will get
  21. %%%                        many identical warnings. The effect of
  22. %%%                        this style file is that only one warning
  23. %%%                        is issued for every cross-reference or 
  24. %%%                        citation.",
  25. %%%  }
  26. %%% ====================================================================
  27.  
  28. \ifx\xrefwarnLoaded\undefined\else\endinput\fi
  29. \let\xrefwarnLoaded\empty
  30.  
  31. \def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi
  32.   \def\@citea{}\@cite{\@for\@citeb:=#2\do
  33.     {\@citea\def\@citea{,\penalty\@m\ }\@ifundefined
  34.        {b@\@citeb}{{\bf #2}\@warning
  35.        {Citation `\@citeb' on page \thepage \space undefined}
  36.        \global\@namedef{b@\@citeb}{{\bf ?}}}%
  37. \hbox{\csname b@\@citeb\endcsname}}}{#1}}
  38.  
  39. \def\ref#1{\@ifundefined{r@#1}{{\bf {#1}?}
  40.    \@ifundefined{rr@#1}{\global\@namedef{rr@#1}{}\@warning
  41.    {Reference `#1' on page \thepage \space 
  42.     undefined}}{}}{\edef\@tempa{\@nameuse{r@#1}}\expandafter
  43.     \@car\@tempa \@nil\null}}
  44.  
  45. \def\pageref#1{\@ifundefined{r@#1}{{\bf {#1}?}
  46.    \@ifundefined{rr@#1}{\global\@namedef{rr@#1}{}\@warning
  47.    {Reference `#1' on page \thepage \space 
  48.     undefined}}{}}{\edef\@tempa{\@nameuse{r@#1}}\expandafter
  49.     \@cdr\@tempa\@nil\null}}
  50.  
  51.